.class public Lcom/xingbook/group/adapter/c;
.super Landroid/widget/BaseAdapter;


# instance fields
.field private a:I

.field private b:I

.field private c:F

.field private d:Landroid/content/Context;

.field private e:Ljava/util/ArrayList;

.field private f:I

.field private g:Landroid/graphics/Bitmap;


# direct methods
.method public constructor <init>(Landroid/app/Activity;Ljava/util/ArrayList;Landroid/widget/ListView;)V
    .locals 4

    const/4 v3, 0x0

    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    iput v3, p0, Lcom/xingbook/group/adapter/c;->a:I

    iput v3, p0, Lcom/xingbook/group/adapter/c;->b:I

    const/4 v0, 0x0

    iput v0, p0, Lcom/xingbook/group/adapter/c;->c:F

    iput v3, p0, Lcom/xingbook/group/adapter/c;->f:I

    invoke-virtual {p1}, Landroid/app/Activity;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    iput-object v0, p0, Lcom/xingbook/group/adapter/c;->d:Landroid/content/Context;

    iput-object p2, p0, Lcom/xingbook/group/adapter/c;->e:Ljava/util/ArrayList;

    invoke-static {p1}, Lcom/xingbook/c/n;->b(Landroid/app/Activity;)F

    move-result v2

    const/high16 v0, 0x4302

    mul-float/2addr v0, v2

    float-to-int v0, v0

    iput v0, p0, Lcom/xingbook/group/adapter/c;->b:I

    const/high16 v0, 0x4348

    mul-float/2addr v0, v2

    float-to-int v0, v0

    invoke-static {p1}, Lcom/xingbook/c/n;->c(Landroid/app/Activity;)I

    move-result v1

    div-int/lit8 v1, v1, 0x4

    if-le v0, v1, :cond_0

    :goto_0
    iput v0, p0, Lcom/xingbook/group/adapter/c;->a:I

    const/high16 v0, 0x4210

    mul-float/2addr v0, v2

    iput v0, p0, Lcom/xingbook/group/adapter/c;->c:F

    iget-object v0, p0, Lcom/xingbook/group/adapter/c;->d:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    const v1, 0x7f020156

    invoke-static {v0, v1}, Lcom/xingbook/c/n;->a(Landroid/content/res/Resources;I)Landroid/graphics/Bitmap;

    move-result-object v0

    iput-object v0, p0, Lcom/xingbook/group/adapter/c;->g:Landroid/graphics/Bitmap;

    invoke-virtual {p3}, Landroid/widget/ListView;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v0

    iget v1, p0, Lcom/xingbook/group/adapter/c;->a:I

    iput v1, v0, Landroid/view/ViewGroup$LayoutParams;->width:I

    iget v0, p0, Lcom/xingbook/group/adapter/c;->b:I

    div-int/lit8 v0, v0, 0x4

    iget v1, p0, Lcom/xingbook/group/adapter/c;->b:I

    div-int/lit8 v1, v1, 0x4

    invoke-virtual {p3, v3, v0, v3, v1}, Landroid/widget/ListView;->setPadding(IIII)V

    return-void

    :cond_0
    move v0, v1

    goto :goto_0
.end method


# virtual methods
.method public a(I)V
    .locals 0

    iput p1, p0, Lcom/xingbook/group/adapter/c;->f:I

    invoke-virtual {p0}, Lcom/xingbook/group/adapter/c;->notifyDataSetChanged()V

    return-void
.end method

.method public getCount()I
    .locals 1

    iget-object v0, p0, Lcom/xingbook/group/adapter/c;->e:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 1

    iget-object v0, p0, Lcom/xingbook/group/adapter/c;->e:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public getItemId(I)J
    .locals 2

    int-to-long v0, p1

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 6

    const/4 v5, 0x0

    const/4 v4, -0x2

    if-nez p2, :cond_0

    new-instance v0, Lcom/xingbook/group/adapter/d;

    invoke-direct {v0, p0}, Lcom/xingbook/group/adapter/d;-><init>(Lcom/xingbook/group/adapter/c;)V

    new-instance p2, Landroid/widget/RelativeLayout;

    iget-object v1, p0, Lcom/xingbook/group/adapter/c;->d:Landroid/content/Context;

    invoke-direct {p2, v1}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;)V

    iput-object p2, v0, Lcom/xingbook/group/adapter/d;->c:Landroid/widget/RelativeLayout;

    new-instance v1, Landroid/widget/AbsListView$LayoutParams;

    iget v2, p0, Lcom/xingbook/group/adapter/c;->a:I

    iget v3, p0, Lcom/xingbook/group/adapter/c;->b:I

    invoke-direct {v1, v2, v3}, Landroid/widget/AbsListView$LayoutParams;-><init>(II)V

    iget-object v2, v0, Lcom/xingbook/group/adapter/d;->c:Landroid/widget/RelativeLayout;

    invoke-virtual {v2, v1}, Landroid/widget/RelativeLayout;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    new-instance v1, Landroid/widget/TextView;

    iget-object v2, p0, Lcom/xingbook/group/adapter/c;->d:Landroid/content/Context;

    invoke-direct {v1, v2}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V

    iput-object v1, v0, Lcom/xingbook/group/adapter/d;->a:Landroid/widget/TextView;

    iget-object v1, v0, Lcom/xingbook/group/adapter/d;->a:Landroid/widget/TextView;

    iget v2, p0, Lcom/xingbook/group/adapter/c;->c:F

    invoke-virtual {v1, v5, v2}, Landroid/widget/TextView;->setTextSize(IF)V

    iget-object v1, v0, Lcom/xingbook/group/adapter/d;->a:Landroid/widget/TextView;

    invoke-virtual {v1}, Landroid/widget/TextView;->setSingleLine()V

    iget-object v1, v0, Lcom/xingbook/group/adapter/d;->a:Landroid/widget/TextView;

    sget-object v2, Landroid/text/TextUtils$TruncateAt;->END:Landroid/text/TextUtils$TruncateAt;

    invoke-virtual {v1, v2}, Landroid/widget/TextView;->setEllipsize(Landroid/text/TextUtils$TruncateAt;)V

    new-instance v1, Landroid/widget/RelativeLayout$LayoutParams;

    invoke-direct {v1, v4, v4}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    const/16 v2, 0xd

    invoke-virtual {v1, v2}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(I)V

    iget-object v2, v0, Lcom/xingbook/group/adapter/d;->a:Landroid/widget/TextView;

    invoke-virtual {v2, v1}, Landroid/widget/TextView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    iget-object v1, v0, Lcom/xingbook/group/adapter/d;->c:Landroid/widget/RelativeLayout;

    iget-object v2, v0, Lcom/xingbook/group/adapter/d;->a:Landroid/widget/TextView;

    invoke-virtual {v1, v2}, Landroid/widget/RelativeLayout;->addView(Landroid/view/View;)V

    new-instance v1, Landroid/widget/ImageView;

    iget-object v2, p0, Lcom/xingbook/group/adapter/c;->d:Landroid/content/Context;

    invoke-direct {v1, v2}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    iput-object v1, v0, Lcom/xingbook/group/adapter/d;->b:Landroid/widget/ImageView;

    iget-object v1, v0, Lcom/xingbook/group/adapter/d;->b:Landroid/widget/ImageView;

    iget-object v2, p0, Lcom/xingbook/group/adapter/c;->g:Landroid/graphics/Bitmap;

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V

    new-instance v1, Landroid/widget/RelativeLayout$LayoutParams;

    invoke-direct {v1, v4, v4}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    const/16 v2, 0xb

    invoke-virtual {v1, v2}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(I)V

    const/16 v2, 0xf

    invoke-virtual {v1, v2}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(I)V

    iget-object v2, v0, Lcom/xingbook/group/adapter/d;->b:Landroid/widget/ImageView;

    invoke-virtual {v2, v1}, Landroid/widget/ImageView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    iget-object v1, v0, Lcom/xingbook/group/adapter/d;->c:Landroid/widget/RelativeLayout;

    iget-object v2, v0, Lcom/xingbook/group/adapter/d;->b:Landroid/widget/ImageView;

    invoke-virtual {v1, v2}, Landroid/widget/RelativeLayout;->addView(Landroid/view/View;)V

    invoke-virtual {p2, v0}, Landroid/view/View;->setTag(Ljava/lang/Object;)V

    move-object v1, v0

    :goto_0
    invoke-virtual {p0, p1}, Lcom/xingbook/group/adapter/c;->getItem(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/xingbook/group/a/c;

    iget-object v2, v1, Lcom/xingbook/group/adapter/d;->a:Landroid/widget/TextView;

    iget-object v0, v0, Lcom/xingbook/group/a/c;->a:Ljava/lang/String;

    invoke-virtual {v2, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    iget v0, p0, Lcom/xingbook/group/adapter/c;->f:I

    if-ne v0, p1, :cond_1

    iget-object v0, v1, Lcom/xingbook/group/adapter/d;->a:Landroid/widget/TextView;

    const v2, -0x705e39

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setTextColor(I)V

    iget-object v0, v1, Lcom/xingbook/group/adapter/d;->b:Landroid/widget/ImageView;

    invoke-virtual {v0, v5}, Landroid/widget/ImageView;->setVisibility(I)V

    :goto_1
    return-object p2

    :cond_0
    invoke-virtual {p2}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/xingbook/group/adapter/d;

    move-object v1, v0

    goto :goto_0

    :cond_1
    iget-object v0, v1, Lcom/xingbook/group/adapter/d;->a:Landroid/widget/TextView;

    const v2, -0x99999a

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setTextColor(I)V

    iget-object v0, v1, Lcom/xingbook/group/adapter/d;->b:Landroid/widget/ImageView;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    goto :goto_1
.end method
